/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.pipeparser.util;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;

/**
 *
 * @author carlos
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {


   

        
        //This code is to get the dataset to compute the component co-ocurrence
        //pattern from Pipes. The output is printed on the stdout in a format
        //that is appropiate for ARMiner.
        //ComponentCoOcurrence ccp = new ComponentCoOcurrence();
        //ccp.createARMinerFile(
        //            "/Users/carlos/svn/pipe-parser/trunk/dataset/pipes/pipes_1000/");

         
        //Parameter value pattern
        //ParamValuePattern pvp = new ParamValuePattern();
        //pvp.createARMinerFile("/Users/carlos/svn/pipe-parser/trunk/dataset/pipes/pipes_1000/");


        
        try{

            MashupRepo mRepo = new MashupRepo("/Users/carlos/svn/pipe-parser/trunk/dataset/pipes/pipes_1000/");
            mRepo.loadCompositions();
            //mRepo.printCompositions();
            //mRepo.printTxtItemsets();
            //mRepo.generateDfConnItemSetsARMiner();

            long begin = System.currentTimeMillis();            
            mRepo.getFrequentDataflowConn(0.075);
            //mRepo.mineDataMappings(0.075);

            System.out.println("\n====== Parameter Value Pattern ======");
            mRepo.mineParamValue(0.075);

            long end = System.currentTimeMillis();

            long diff = end - begin;
            System.out.println("\nEXECUTION TIME: " + diff + "ms");
            //mRepo.printRepoStatistics();
            

        }catch(Exception e){

            e.printStackTrace();
            
        }
         
    }
         

}
